<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\Route;
// Route::get('home', 'index/index/index');
// Route::get('ppp', 'admin/ppp');

// Route::any('ooxx', 'index/index/index');
// Route::get('user/[:id]', 'index/index/user');// 可选参数
// Route::get('blog/:id', 'index/blog/index',['method'=>'get'], ['id'=>'\d+']);
// Route::get('blog/:name', 'index/blog/read',['method'=>'get'], ['name'=>'\w+']);

// URL
// Route::get('url', 'index/index/url');

// 资源控制器的路由   7个路由
// Route::get('redcat/show', 'admin/index/show');
// Route::get('redcat/insert', 'admin/index/insert');
// Route::get('redcat/delete', 'admin/index/delete');
// Route::get('redcat/update', 'admin/index/update');
Route::resource('adminlist', 'admin/adminlist');
Route::resource('adminpower', 'admin/adminpower');
Route::resource('adminrole', 'admin/adminrole');
return [
    '__pattern__' => [
        'name' => '\w+',
    ],
    '[hello]'     => [
        ':id'   => ['index/hello', ['method' => 'get'], ['id' => '\d+']],
        ':name' => ['index/hello', ['method' => 'post']],
    ],

];
